package ifmo.group5512.util;


import ifmo.group5512.dao.IOrderDAO;
import ifmo.group5512.dao.impl.OrderDAO;

public class DaoFactory {
    private static DaoFactory instance;
    private static IOrderDAO orderDAO = null;

    public static synchronized DaoFactory getInstance(){
        if (instance == null){
            instance = new DaoFactory();
        }
        return instance;
    }

    public IOrderDAO getOrderDAO(){
        if (orderDAO == null){
            orderDAO = new OrderDAO();
        }
        return orderDAO;
    }
    private DaoFactory(){}
}
